angular.module("myApp")
.controller("shopController",["$scope","shopService",
    function($scope,shopService){
        shopService.getData().success(function(res){
            $scope.list = res;
            console.log(res);
        })
}])
.controller("shopStyle",["$scope",function($scope){
	var shopUl = document.getElementsByClassName('shop_main_nav')[0],
	lisb = document.getElementsByClassName('nav_allcountry')[0],
	hot = document.getElementsByClassName("shop_hotplace"),
	con = document.getElementsByClassName("shop_allcountry");
	for(var i = 0; i< shopUl.children.length; i++) {
		shopUl.children[i].onclick = function(e){
			e = e || window.event;
			for(var j = 0; j< shopUl.children.length; j++) {
				shopUl.children[j].className = "";
			};
			this.className = "clickchange";
			if (this === shopUl.children[0]) {
				hot[0].style.display = "block";
				con[0].style.display = "none";
			}else{
				hot[0].style.display = "none";
				con[0].style.display = "block";
			}
		}
	}
}])